package com.onedec.attendance.utils;

import org.gavaghan.geodesy.Ellipsoid;
import org.gavaghan.geodesy.GeodeticCalculator;
import org.gavaghan.geodesy.GlobalCoordinates;

public class AttendUtil {
    public static final double LATITUDE=29.585614;
    public static final double LONGTITUDE=106.525465;
    public static final double HEIGHT=290.69293212890625;
    public static final String wifiName="JS1";

    public static double getDistance(double longitudeFrom, double latitudeFrom) {
        GlobalCoordinates source = new GlobalCoordinates(latitudeFrom, longitudeFrom);
        GlobalCoordinates target = new GlobalCoordinates(LATITUDE, LONGTITUDE);
        return new GeodeticCalculator().calculateGeodeticCurve(Ellipsoid.Sphere, source, target).getEllipsoidalDistance();
    }



}
